

<template>
  <div class="card">
   <div v-for="item in dataC">{{item}}</div>
  </div>
</template>
 
<script setup lang="ts">
import { getCurrentInstance,reactive} from 'vue'
const instance = getCurrentInstance();
const dataC =reactive([1,2,3])

  instance?.proxy?.$Bus.on('wangyihaun',(data)=>{
     dataC.push(dataC)
  })

</script>
 
<style scoped lang='less'>
@border:#ccc;
.card{
    width: 300px;
    border: 1px solid @border;
    border-radius: 3px;
    &:hover{
        box-shadow:0 0 10px @border;
    }
 
    &-content{
        padding: 10px;
    }
    &-header{
        display: flex;
        justify-content: space-between;
        padding: 10px;
        border-bottom: 1px solid @border;
    }
}
</style>
